package com.CodingInn.code.pojo;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * 工厂bean和普通bean的区别
 * 1.工厂bean=实现了FactoryBean接口的组件,注册的是这个工厂调用了getObject返回的对象
 */
//@Component
public class HelloFactory implements FactoryBean<Hello> {
	@Override
	public Hello getObject() throws Exception {
		return new Hello();
	}

	@Override
	public Class<?> getObjectType() {
		return Hello.class;
	}
}
